home *** CD-ROM | disk | FTP | other *** search
/ Freelog 125 / Freelog_MarsAvril2015_No125.iso / Securite / Password Safe / pwsafe-3.35.exe / pwsafe.xsd < prev    next >
Extensible Markup Language  |  2013-09-17  |  17KB  |  314 lines

  1. <?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
  2. <xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. attributeFormDefault="unqualified" elementFormDefault="qualified"
  4. xmlns:xs="http://www.w3.org/2001/XMLSchema" version="3.18">
  5.  
  6. <xs:annotation>
  7.   <xs:documentation xml:lang="en">
  8.     This XML Schema corresponds to V3.29 of Password Safe.
  9.     As each new version is a 'superset' of previous versions, the current version of Password Safe
  10.     will be able to import XML files created by all prior versions.
  11.     However, in V3.13 element 'ltime' has been replaced by 'xtime' for the Password Expiry Time.
  12.     Either is currently allowed, although future updates may remove the 'ltime' choice and therefore
  13.     errors will be issued during XML Import if the 'ltime' element is present in the XML file.
  14.     In V3.18, preference "DisplayExpandedAddEditDlg" was made obsolete and will now be ignored if present.
  15.     In V3.26, support for importing database and entry 'Unknown Fields' has been removed as they cannot be
  16.     processed. In addition, fields ctime, ltime, xtime, pmtime and rmtime are being depreciated in favour
  17.     of the XML standard for representing datetimes (fields ctimex, ltimex, xtimex, pmtimex and rmtimex).
  18.     In a future release, the old fields will no longer be supported making this schema 'cleaner' and
  19.     'simpler'.
  20.     In V3.27, support for ShiftDCA was added.
  21.     In V3.28, support for Password Policy Names was added and support for depreciated times was removed.
  22.     In V3.29, support for Empty Groups was added.
  23.   </xs:documentation>
  24. </xs:annotation>
  25.  
  26. <!-- Special types to allow easier processing of Password Safe data -->
  27. <xs:simpleType name="characterType">
  28.   <xs:restriction base="xs:string">
  29.     <xs:length value="1" />
  30.   </xs:restriction>
  31. </xs:simpleType>
  32.  
  33. <xs:simpleType name="uuidType">
  34.   <xs:restriction base="xs:hexBinary">
  35.     <xs:length value="16" fixed="true" />
  36.   </xs:restriction>
  37. </xs:simpleType>
  38.  
  39. <xs:simpleType name="stringType">
  40.   <xs:restriction base="xs:string">
  41.     <xs:whiteSpace value="preserve" />
  42.   </xs:restriction>
  43. </xs:simpleType>
  44.  
  45. <xs:complexType name="datetimestampType">
  46.   <xs:sequence>
  47.     <xs:element name="date" type="xs:date" minOccurs="1" maxOccurs="1"/>
  48.     <xs:element name="time" type="xs:time" minOccurs="1" maxOccurs="1"/>
  49.   </xs:sequence>
  50. </xs:complexType>
  51.  
  52. <xs:simpleType name="expirydaysType">
  53.   <xs:restriction base="xs:int">
  54.     <xs:minInclusive value="1" />
  55.     <xs:maxInclusive value="3650" />
  56.   </xs:restriction>
  57. </xs:simpleType>
  58.  
  59. <xs:simpleType name="fileuuidType">
  60.   <xs:restriction base="xs:string">
  61.     <xs:pattern value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA¡F]{12}" />
  62.   </xs:restriction>
  63. </xs:simpleType>
  64.  
  65. <xs:simpleType name="boolType">
  66.   <xs:restriction base="xs:int">
  67.     <xs:minInclusive value="0" />
  68.     <xs:maxInclusive value="1" />
  69.   </xs:restriction>
  70. </xs:simpleType>
  71.  
  72. <xs:simpleType name="passwordlengthType">
  73.   <xs:restriction base="xs:int">
  74.     <xs:minInclusive value="4" />
  75.     <xs:maxInclusive value="1024" />
  76.   </xs:restriction>
  77. </xs:simpleType>
  78.  
  79. <xs:simpleType name="passwordlengthType2">
  80.   <xs:restriction base="xs:int">
  81.     <xs:minInclusive value="0" />
  82.     <xs:maxInclusive value="1024" />
  83.   </xs:restriction>
  84. </xs:simpleType>
  85.  
  86. <xs:simpleType name="timeoutType">
  87.   <xs:restriction base="xs:int">
  88.     <xs:minInclusive value="1" />
  89.     <xs:maxInclusive value="120" />
  90.   </xs:restriction>
  91. </xs:simpleType>
  92.  
  93. <xs:simpleType name="displaystatusType">
  94.   <xs:restriction base="xs:string">
  95.     <xs:enumeration value="AllCollapsed" />
  96.     <xs:enumeration value="AllExpanded" />
  97.     <xs:enumeration value="AsPerLastSave" />
  98.   </xs:restriction>
  99. </xs:simpleType>
  100.  
  101. <xs:simpleType name="pwhistoryType">
  102.   <xs:restriction base="xs:int">
  103.     <xs:minInclusive value="0" />
  104.     <xs:maxInclusive value="255" />
  105.   </xs:restriction>
  106. </xs:simpleType>
  107.  
  108. <xs:simpleType name="dcaType">
  109.   <xs:restriction base="xs:int">
  110.     <xs:minInclusive value="0" />
  111.     <xs:maxInclusive value="9" />
  112.   </xs:restriction>
  113. </xs:simpleType>
  114.  
  115. <xs:simpleType name="kbshortcutType">
  116.   <xs:restriction base="xs:string">
  117.     <!-- Modifier:    A(lt), C(trl), S(hift), E(xt), M(eta), W(in), cm(D)
  118.                       Note: Meta, Win & Cmd are not supported by Windows
  119.          Virtual Key: Any except: space (&\20), tab (\t), newline (\n) and return (\r)
  120.                       Written as 4 hex characters
  121.       -->
  122.     <xs:pattern value="(A|C|S|E|M|W|D)+:[0-9a-fA-F]{4}" />
  123.   </xs:restriction>
  124. </xs:simpleType>
  125.  
  126. <!-- End of Special types -->
  127.  
  128. <xs:complexType name="policynamesType">
  129.   <!-- Start Named Password Policy Fields -->
  130.   <xs:sequence>
  131.   <xs:element name="Policy" minOccurs="1" maxOccurs="unbounded" >
  132.     <xs:complexType>
  133.       <xs:all>
  134.         <xs:element name="PWName" type="stringType" minOccurs="1" maxOccurs="1" />
  135.         <xs:element name="PWDefaultLength" type="passwordlengthType" minOccurs="1" maxOccurs="1" />
  136.         <xs:element name="PWUseDigits" type="boolType" minOccurs="0" maxOccurs="1" />
  137.         <xs:element name="PWUseEasyVision" type="boolType" minOccurs="0" maxOccurs="1" />
  138.         <xs:element name="PWUseHexDigits" type="boolType" minOccurs="0" maxOccurs="1" />
  139.         <xs:element name="PWUseLowercase" type="boolType"  minOccurs="0" maxOccurs="1" />
  140.         <xs:element name="PWUseSymbols" type="boolType" minOccurs="0" maxOccurs="1" />
  141.         <xs:element name="PWUseUppercase" type="boolType" minOccurs="0" maxOccurs="1" />
  142.         <xs:element name="PWMakePronounceable" type="boolType" minOccurs="0" maxOccurs="1" />
  143.         <xs:element name="PWLowercaseMinLength" type="passwordlengthType2" minOccurs="0" maxOccurs="1" />
  144.         <xs:element name="PWUppercaseMinLength" type="passwordlengthType2" minOccurs="0" maxOccurs="1" />
  145.         <xs:element name="PWDigitMinLength" type="passwordlengthType2" minOccurs="0" maxOccurs="1" />
  146.         <xs:element name="PWSymbolMinLength" type="passwordlengthType2" minOccurs="0" maxOccurs="1" />
  147.         <xs:element name="symbols" type="stringType" minOccurs="0" maxOccurs="1" />
  148.       </xs:all>
  149.     </xs:complexType>
  150.   </xs:element>
  151.   </xs:sequence>
  152.   <!-- End Named Password Policy Fields -->
  153. </xs:complexType>
  154.  
  155. <xs:complexType name="EmptyGroupsType">
  156.   <!-- Start Empty Groups -->
  157.   <xs:sequence>
  158.     <xs:element name="EGName" type="stringType" minOccurs="1" maxOccurs="unbounded" />
  159.   </xs:sequence>
  160.   <!-- End Empty Groups -->
  161. </xs:complexType>
  162.  
  163. <!-- Start of proper Password Safe validation XSD -->
  164.   <xs:element name="passwordsafe">
  165.   <!-- Start Database -->
  166.     <xs:complexType>
  167.       <xs:sequence>
  168.         <!-- Start Database Preferences -->
  169.         <xs:element name="Preferences" minOccurs="0" maxOccurs="1">
  170.           <xs:complexType>
  171.             <xs:all>
  172.               <!-- Boolean Preferences -->
  173.               <xs:element name="DisplayExpandedAddEditDlg" type="boolType" minOccurs="0" maxOccurs="1" />
  174.               <xs:element name="MaintainDateTimeStamps" type="boolType" minOccurs="0" maxOccurs="1" />
  175.               <xs:element name="LockDBOnIdleTimeout" type="boolType" minOccurs="0" maxOccurs="1" />
  176.               <xs:element name="PWUseDigits" type="boolType" minOccurs="0" maxOccurs="1" />
  177.               <xs:element name="PWUseEasyVision" type="boolType" minOccurs="0" maxOccurs="1" />
  178.               <xs:element name="PWUseHexDigits" type="boolType" minOccurs="0" maxOccurs="1" />
  179.               <xs:element name="PWUseLowercase" type="boolType" minOccurs="0" maxOccurs="1" />
  180.               <xs:element name="PWUseSymbols" type="boolType" minOccurs="0" maxOccurs="1" />
  181.               <xs:element name="PWUseUppercase" type="boolType" minOccurs="0" maxOccurs="1" />
  182.               <xs:element name="PWMakePronounceable" type="boolType" minOccurs="0" maxOccurs="1" />
  183.               <xs:element name="SaveImmediately" type="boolType" minOccurs="0" maxOccurs="1" />
  184.               <xs:element name="SavePasswordHistory" type="boolType" minOccurs="0" maxOccurs="1" />
  185.               <xs:element name="ShowNotesDefault" type="boolType" minOccurs="0" maxOccurs="1" />
  186.               <xs:element name="ShowPWDefault" type="boolType" minOccurs="0" maxOccurs="1" />
  187.               <xs:element name="ShowPasswordInTree" type="boolType" minOccurs="0" maxOccurs="1" />
  188.               <xs:element name="ShowUsernameInTree" type="boolType" minOccurs="0" maxOccurs="1" />
  189.               <xs:element name="SortAscending" type="boolType" minOccurs="0" maxOccurs="1" />
  190.               <xs:element name="UseDefaultUser" type="boolType" minOccurs="0" maxOccurs="1" />
  191.               <xs:element name="CopyPasswordWhenBrowseToURL" type="boolType" minOccurs="0" maxOccurs="1" />
  192.   
  193.               <!-- Integer Preferences -->
  194.               <xs:element name="PWDefaultLength" type="passwordlengthType" minOccurs="0" maxOccurs="1" />
  195.               <xs:element name="IdleTimeout" type="timeoutType" minOccurs="0" maxOccurs="1" />
  196.               <xs:element name="TreeDisplayStatusAtOpen" type="displaystatusType" minOccurs="0" maxOccurs="1" />
  197.               <xs:element name="NumPWHistoryDefault" type="pwhistoryType" minOccurs="0" maxOccurs="1" />
  198.               <xs:element name="PWDigitMinLength" type="passwordlengthType2" minOccurs="0" maxOccurs="1" />
  199.               <xs:element name="PWLowercaseMinLength" type="passwordlengthType2" minOccurs="0" maxOccurs="1" />
  200.               <xs:element name="PWSymbolMinLength" type="passwordlengthType2" minOccurs="0" maxOccurs="1" />
  201.               <xs:element name="PWUppercaseMinLength" type="passwordlengthType2" minOccurs="0" maxOccurs="1" />
  202.   
  203.               <!-- String Preferences -->
  204.               <xs:element name="DefaultUsername" type="stringType" minOccurs="0" maxOccurs="1" />
  205.               <xs:element name="DefaultAutotypeString" type="stringType" minOccurs="0" maxOccurs="1" />
  206.               <xs:element name="DefaultSymbols" type="stringType" minOccurs="0" maxOccurs="1" />
  207.             </xs:all>
  208.           </xs:complexType>
  209.         <!-- End Database Preferences -->
  210.         </xs:element>
  211.  
  212.         <!-- Multiple PolicyNames in database -->
  213.         <xs:element name="NamedPasswordPolicies" type="policynamesType" minOccurs="0" maxOccurs="1" />
  214.         
  215.         <xs:element name="EmptyGroups" type="EmptyGroupsType" minOccurs="0" maxOccurs="1" />
  216.         
  217.         <!-- Start Database Entries -->
  218.         <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
  219.           <xs:complexType>
  220.             <xs:all>
  221.               <xs:element name="group" type="stringType" minOccurs="0" maxOccurs="1" />
  222.               <xs:element name="title" type="stringType" minOccurs="1" maxOccurs="1" />
  223.               <xs:element name="username" type="stringType" minOccurs="0" maxOccurs="1" />
  224.               <xs:element name="password" type="stringType" minOccurs="1" maxOccurs="1" />
  225.               <xs:element name="url" type="stringType" minOccurs="0" maxOccurs="1" />
  226.               <xs:element name="autotype" type="stringType" minOccurs="0" maxOccurs="1" />
  227.               <xs:element name="notes" type="stringType" minOccurs="0" maxOccurs="1" />
  228.               <xs:element name="uuid" type="uuidType" minOccurs="0" maxOccurs="1" />
  229.               <xs:element name="ctimex" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
  230.               <xs:element name="atimex" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
  231.               <xs:element name="xtimex" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
  232.               <xs:element name="pmtimex" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
  233.               <xs:element name="rmtimex" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
  234.               <xs:element name="xtime_interval" type="expirydaysType" minOccurs="0" maxOccurs="1" />
  235.               <xs:element name="pwhistory" minOccurs="0" maxOccurs="1">
  236.               <!-- Start Password History Fields -->
  237.                 <xs:complexType>
  238.                   <xs:all>
  239.                     <xs:element name="status" type="boolType" minOccurs="1" maxOccurs="1" />
  240.                     <xs:element name="max" type="pwhistoryType" minOccurs="1" maxOccurs="1" />
  241.                     <xs:element name="num" type="pwhistoryType" minOccurs="1" maxOccurs="1" />
  242.                     <xs:element name="history_entries" minOccurs="0" maxOccurs="1">
  243.                       <xs:complexType>
  244.                         <xs:sequence>
  245.                           <xs:element name="history_entry" minOccurs="0" maxOccurs="255">
  246.                             <xs:complexType>
  247.                               <xs:all>
  248.                                 <xs:element name="changedx" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
  249.                                 <xs:element name="oldpassword" type="stringType" minOccurs="1" maxOccurs="1" />
  250.                               </xs:all>
  251.                               <xs:attribute name="num" type="xs:int" use="optional" />
  252.                             </xs:complexType>
  253.                           </xs:element>
  254.                         </xs:sequence>
  255.                       </xs:complexType>
  256.                     </xs:element>
  257.                   </xs:all>
  258.                 </xs:complexType>
  259.               <!-- End Password History Fields -->
  260.               </xs:element>
  261.               <xs:element ref="entrypolicyType" minOccurs="0" maxOccurs="1" />
  262.               <xs:element name="runcommand" type="stringType" minOccurs="0" maxOccurs="1" />
  263.               <xs:element name="dca" type="dcaType" minOccurs="0" maxOccurs="1" />
  264.               <xs:element name="shiftdca" type="dcaType" minOccurs="0" maxOccurs="1" />
  265.               <xs:element name="email" type="stringType" minOccurs="0" maxOccurs="1" />
  266.               <xs:element name="protected" type="boolType" minOccurs="0" maxOccurs="1" />
  267.               <xs:element name="symbols" type="stringType" minOccurs="0" maxOccurs="1" />
  268.               <xs:element name="kbshortcut" type="kbshortcutType" minOccurs="0" maxOccurs="1" />
  269.             </xs:all>
  270.             <xs:attribute name="id" type="xs:int" use="optional" />
  271.             <xs:attribute name="normal" type="xs:boolean" use="optional" />
  272.           </xs:complexType>
  273.         <!-- End Database Entries -->
  274.         </xs:element>
  275.       </xs:sequence>
  276.       <!-- Start Database Attributes -->
  277.       <xs:attribute name="delimiter" type="characterType" use="required" />
  278.       <xs:attribute name="Database" type="stringType" use="optional" />
  279.       <xs:attribute name="ExportTimeStamp" type="xs:dateTime" use="optional" />
  280.       <xs:attribute name="FromDatabaseFormat" type="stringType" use="optional" />
  281.       <xs:attribute name="WhatSaved" type="stringType" use="optional" />
  282.       <xs:attribute name="WhoSaved" type="stringType" use="optional" />
  283.       <xs:attribute name="WhenLastSaved" type="xs:dateTime" use="optional" />
  284.       <xs:attribute name="Database_uuid" type="fileuuidType" use="optional" />
  285.       <!-- End Database Attributes -->
  286.     </xs:complexType>
  287.   <!-- End Database -->
  288.   </xs:element>
  289.  
  290.   <!-- Since can't put xs:choice within xs:all - do it this way! -->
  291.   <xs:element name="entrypolicyType" abstract="true" />
  292.   <xs:element name="PasswordPolicyName" type="stringType" substitutionGroup="entrypolicyType" />
  293.   <xs:element name="PasswordPolicy" substitutionGroup="entrypolicyType" >
  294.     <!-- Start Password Policy Fields -->
  295.     <xs:complexType>
  296.       <xs:all>
  297.         <xs:element name="PWLength" type="passwordlengthType" minOccurs="1" />
  298.         <xs:element name="PWUseDigits" type="boolType" minOccurs="0" maxOccurs="1" />
  299.         <xs:element name="PWUseEasyVision" type="boolType" minOccurs="0" maxOccurs="1" />
  300.         <xs:element name="PWUseHexDigits" type="boolType" minOccurs="0" maxOccurs="1" />
  301.         <xs:element name="PWUseLowercase" type="boolType"  minOccurs="0" maxOccurs="1" />
  302.         <xs:element name="PWUseSymbols" type="boolType" minOccurs="0" maxOccurs="1" />
  303.         <xs:element name="PWUseUppercase" type="boolType" minOccurs="0" maxOccurs="1" />
  304.         <xs:element name="PWMakePronounceable" type="boolType" minOccurs="0" maxOccurs="1" />
  305.         <xs:element name="PWLowercaseMinLength" type="passwordlengthType2" minOccurs="0" maxOccurs="1" />
  306.         <xs:element name="PWUppercaseMinLength" type="passwordlengthType2" minOccurs="0" maxOccurs="1" />
  307.         <xs:element name="PWDigitMinLength" type="passwordlengthType2" minOccurs="0" maxOccurs="1" />
  308.         <xs:element name="PWSymbolMinLength" type="passwordlengthType2" minOccurs="0" maxOccurs="1" />
  309.       </xs:all>
  310.     </xs:complexType>
  311.     <!-- End Password Policy Fields -->
  312.   </xs:element>
  313. </xs:schema>
  314. <!-- End of proper Password Safe validation XSD -->